<template>
	<view class="authentication">

		<view class="black_1">实名认证</view>
		
		<view class="black_2">为有效保障您的资金安全，提升订单处理效率，请填写与您 身份证一致的信息，否则不会通过审核。</view>
	
		<view class="black_3">真实姓名</view>
		<input class="black_5"
		 v-model="name"
		 placeholder="请输入" placeholder-style="font-size:30rpx"/>
		<view class="black_6">身份证号</view>
		<input class="black_5"
		 v-model="id_card"
		type="idcard"
		placeholder="请输入" placeholder-style="font-size:30rpx"/>
		<view class="black_7" @click="userauth()">提交认证</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id_card: '',
				name: '',
			};
		},
		onLoad(opt) {
			// this.mobile = opt.mobile
		},
		methods: {
			userauth(){
				if(!this.name){
					this.custom.tool.showToast("请输入名字");
					return 
				}
				if(!this.id_card){
					this.custom.tool.showToast("请输入身份证号");
					return 
				}
				let data = {
					"full_name": this.name,
					"id_num": this.id_card,
				}
				
				this.api.http.requests("user/identityAuth", data, res => {
					// this.custom.tool.showToast(res.msg);
					uni.showToast({
						title: res.msg,
						success: function() {
							setTimeout(function() {
								// that.custom.tool.jump(4, 1);
								uni.$emit('paySuccsse',{type:1,msg:res.msg})
								uni.navigateBack()
							}, 2000) //延迟时间 
						}
					})
				
				}, "POST")
			},
			sendCode() {

				
			}

		}
	}
</script>
<style>
	
	page{
		background-color: "#fff";
	}
	
</style>
<style scoped lang="less">
.authentication{
	padding: 10px 20px;
}

.black_1{
	font-size: 49rpx;
	font-weight: bold;
	color: #202020;
	margin-top: 30px;
	
}

.black_2{
	font-size: 25rpx;
	font-weight: 400;
	color: #666666;
	margin-top: 10px;
	
}
.black_5{
	margin-top: 15px;
	
	padding: 8px 5px;
	border-radius: 5px;
	border:1px solid #D9D9D9;
}
.black_3,.black_6{
	margin-top: 20px;
	font-size: 32rpx;
	font-weight: bold;
	color: #202020;
}
.black_6{
	margin-top: 20px;
}

.black_7{
	font-size: 35rpx;
	font-weight: 400;
	color: #FFFFFF;
	background-color: #FE903D;
	padding: 15px 10px;
	border-radius: 5px;
	text-align: center;
	margin-top: 50px;
}



</style>
